<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>false 的布尔值是 false</title>
</head>

<body>
    <p>显示 false 的布尔值：</p>
    <button onclick="myFunction()">试一试</button>
    <p id="demo"></p>
    <script>
        function myFunction() {
            var x = false;
            document.getElementById("demo").innerHTML = Boolean(x);
        }
    </script>
</body>

</html>